package com.example.simplemap1;

import java.io.IOException;
import java.io.InputStream;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends Activity {
	private WebView webView;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		webView = (WebView) findViewById(R.id.webview);
		
		try {
			InputStream is = getResources().getAssets().open("simple_map.html");
			byte[] buf = new byte[20000];
			int count = is.read(buf);
			String str = new String(buf,0,count,"utf-8");
			is.close();
			webView.getSettings().setJavaScriptEnabled(true);
			webView.setWebViewClient(new WebViewClient());
			webView.loadDataWithBaseURL(null, str, "text/html", "utf-8", null);
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
}
